<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html>
<head>
	<title>客户管理</title>
	<link rel="stylesheet" href="pages/huaao/customer/css/customer.css" type="text/css"></link>
	<script type="text/javascript" src="pages/huaao/customer/js/customer.js"></script>
</head>
<body>
	<div class="container-fluid">
		<ul class="nav nav-tabs">
			<li role="presentation" class="active">
				<a href="#customer-info" aria-controls="customer-info" role="tab" data-toggle="tab">客户信息管理</a>
			</li>
		</ul>
		<div class="tab-content">
			<div id="customer-info" role="tabpanel" class="tab-pane active">
				<div id="toolbar" class="toolbar">
					<button id="addCustomer-btn" type="button" class="btn btn-default">
						<i class="glyphicon glyphicon-plus"></i>添加
					</button>
					<button id="delCustomer-btn" type="button" class="btn btn-default">
						<i class="glyphicon glyphicon-remove"></i>删除
					</button>
			    	<button id="resetPassword-btn" type="button" class="btn btn-default" >
			    		<i class="glyphicon glyphicon-repeat"></i>重置密码
			    	</button>
			    	<button id="locked-btn" type="button" class="btn btn-default" >
			    		<i class="glyphicon glyphicon-lock"></i>锁定/解锁
			    	</button>
				</div>
				<table id="customer-table"></table>
			</div>
		</div>
	</div>
	
	<div class="container-fluid hidden" style="margin-top: 10px;" id="customerDetail">
		<ul class="nav nav-tabs">
			<li role="presentation" class="active">
				<a href="#customer-base-info" aria-controls="customer-base-info" role="tab" data-toggle="tab">客户基本信息</a>
			</li>
			<!-- 
			<li role="presentation">
				<a href="#customer-machine-info" aria-controls="customer-machine-info" role="tab" data-toggle="tab">客户设备信息</a>
			</li> -->
		</ul>
		<div class="tab-content" style="min-height:300px;">
			<div id="customer-base-info" role="tabpanel" class="tab-pane active">
				<div class="row">
					<div class="col-xs-12 col-sm-12 col-md-12 text-right">
						<button type="button" class="btn btn-warning" id="pushMessageBtn">推送消息</button>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">客户姓名：</label>
						<label id="cname"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">客户账号：</label>
						<label id="caccount"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">客户手机号：</label>
						<label id="cphone"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">客户性别：</label>
						<label id="cgender"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">客户公司/单位：</label>
						<label id="ccompany"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">客户头像：</label>
						<label id="cphoto"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">设备系统：</label>
						<label id="dsystem"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">设备生产商：</label>
						<label id="dvendor"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">设备型号：</label>
						<label id="dmodel"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">设备唯一编码：</label>
						<label id="duuid"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">推送服务令牌：</label>
						<label id="ctoken"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">客户端APP版本：</label>
						<label id="cversion"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">最近登录地址：</label>
						<label id="lastloginaddress"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">最近登录时间：</label>
						<label id="lastlogintime"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">创建时间：</label>
						<label id="ccreatetime"></label>
					</div>
					<div class="col-xs-12 col-sm-6 col-md-4">
						<label class="base-info-label1">修改时间：</label>
						<label id="cmodifytime"></label>
					</div>
				</div>
			</div>
			
			<div id="customer-machine-info" role="tabpanel" class="tab-pane">
				<div class="row" id="customerMachines">
					<div class="col-xs-12 col-sm-6 col-md-6">
						客户的设备列表
					</div>
				</div>
			</div>
			
		</div>
	</div>

	<!-- customerinfo modal -->
	<div id="customerinfo-modal" class="modal fade" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog modal-lg" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">客户信息</h4>
				</div>
				<div class="modal-body">

					<form id="customerinfo-form" class="form-horizontal">

						<div class="form-group">
							<label for="customerPhone" class="col-md-2 control-label">手机号*</label>
							<div class="col-md-6">
								<input type="hidden" id="customerId" name="customerId" />
								<input type="text" class="form-control info-input" id="customerPhone" name="customerPhone" placeholder="请输入客户手机号">
							</div>
							<label id="customerPhone-label" class="col-md-4 info-label"></label>
						</div>
						<div class="form-group">
							<label for="customerName" class="col-md-2 control-label">姓名</label>
							<div class="col-md-6">
								<input type="text" class="form-control info-input" id="customerName" name="customerName" placeholder="请输入客户姓名">
							</div>
							<label id="customerName-label" class="col-md-4 info-label"></label>
						</div>
						<div class="form-group">
							<label for="customerGender" class="col-md-2 control-label">性别</label>
							<div class="col-md-6">
								<input type="radio" class="info-input" id="customerMale" name="customerGender" value="1">先生&nbsp;&nbsp;
								<input type="radio" class="info-input" id="customerFemale" name="customerGender" value="0">女士
							</div>
							<label id="customerGender-label" class="col-md-4 info-label"></label>
						</div>
						<div class="form-group">
							<label for="customerCompany" class="col-md-2 control-label">公司/单位</label>
							<div class="col-md-6">
								<input type="text" class="form-control info-input" id="customerCompany" name="customerCompany" placeholder="请输入客户公司/单位">
							</div>
							<label id="customerCompany-label" class="col-md-4 info-label"></label>
						</div>
						
					</form>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button id="customerinfo-save-btn" type="button" class="btn btn-primary">保存</button>
				</div>
			</div>
		</div>
	</div>
	
	<!-- pushMessage modal -->
	<div id="pushMessage-modal" class="modal fade" tabindex="-1"
		role="dialog" aria-labelledby="pushMessageLabel">
		<div class="modal-dialog modal-lg" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="pushMessageLabel">推送消息</h4>
				</div>
				<div class="modal-body">

					<form id="pushMessage-form" class="form-horizontal">

						<div class="form-group">
							<label for="title" class="col-md-2 control-label">消息标题*</label>
							<div class="col-md-6">
								<input type="hidden" id="customerId" name="customerId" />
								<input type="text" class="form-control info-input" id="title" name="title" placeholder="请输入标题">
							</div>
							<label id="title-label" class="col-md-4 info-label"></label>
						</div>
						<div class="form-group">
							<label for="content" class="col-md-2 control-label">消息内容*</label>
							<div class="col-md-6">
								<input type="text" class="form-control info-input" id="content" name="content" placeholder="请输入内容">
							</div>
							<label id="content-label" class="col-md-4 info-label"></label>
						</div>
						<div class="form-group">
							<label for="payload" class="col-md-2 control-label">命令</label>
							<div class="col-md-6">
								<select id="payload">
									<option value="-1">请选择</option>
									<option value="relogin">重新登录</option>
									<option value="quit">退出应用</option>
									<option value="restart">重启应用</option>
								</select>
							</div>
							<label id="payload-label" class="col-md-4 info-label"></label>
						</div>
						
					</form>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					<button id="pushMessage-send-btn" type="button" class="btn btn-primary">发送</button>
				</div>
			</div>
		</div>
	</div>
</body>
</html>